Skip to content

Refactor to simplify netfx retargeting #2024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 2, 2019

Conversation

bahusoid
Copy link
Member

I was checking some stuff under .NET 4.7 and have had some struggle to make it compile. So let's simplify it a bit..

Copy link
Member

@fredericDelaporte fredericDelaporte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not adding a build variable (like NhAppTargetFrameworks, so maybe NhNetFxTarget) instead, and using it everywhere we currently hard-code net461? NHibernate.Tool.HbmXsd\NHibernate.Tool.HbmXsd.csproj could also benefit of it.

default.build should also use a similar solution, since it also needs some updating at many places if we change the NetFx target framework.

(There are many other net461 occurrences in the sources, but those which should change cannot be handled similarly.)

<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
<DefineConstants>NET461,$(DefineConstants)</DefineConstants>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<DefineConstants>NETFX,$(DefineConstants)</DefineConstants>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bahusoid
Copy link
Member Author

bahusoid commented Feb 27, 2019

Why not adding a build variable (like NhAppTargetFrameworks, so maybe NhNetFxTarget) instead, and using it everywhere we currently hard-code net461

In theory NHibernate can build multiple netfx targets so I think we don't need to introduce separate single netfx target property.

And I would like to keep scope of this PR to NHibenate solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants